# Maintainer: T.J. Townsend <blakkheim@archlinux.org>

pkgbase=nerd-fonts
pkgname=(otf-aurulent-nerd
         otf-codenewroman-nerd
         otf-comicshanns-nerd
         otf-droid-nerd
         otf-firamono-nerd
         otf-hasklig-nerd
         otf-hermit-nerd
         otf-opendyslexic-nerd
         otf-overpass-nerd
         ttf-3270-nerd
         ttf-agave-nerd
         ttf-anonymouspro-nerd
         ttf-arimo-nerd
         ttf-bigblueterminal-nerd
         ttf-bitstream-vera-mono-nerd
         ttf-cascadia-code-nerd
         ttf-cousine-nerd
         ttf-daddytime-mono-nerd
         ttf-dejavu-nerd
         ttf-fantasque-nerd
         ttf-firacode-nerd
         ttf-go-nerd
         ttf-hack-nerd
         ttf-heavydata-nerd
         ttf-iawriter-nerd
         ttf-ibmplex-mono-nerd
         ttf-inconsolata-go-nerd
         ttf-inconsolata-lgc-nerd
         ttf-inconsolata-nerd
         ttf-iosevka-nerd
         ttf-iosevkaterm-nerd
         ttf-jetbrains-mono-nerd
         ttf-lekton-nerd
         ttf-liberation-mono-nerd
         ttf-lilex-nerd
         ttf-meslo-nerd
         ttf-monofur-nerd
         ttf-monoid-nerd
         ttf-mononoki-nerd
         ttf-mplus-nerd
         ttf-noto-nerd
         ttf-profont-nerd
         ttf-proggyclean-nerd
         ttf-roboto-mono-nerd
         ttf-sharetech-mono-nerd
         ttf-sourcecodepro-nerd
         ttf-space-mono-nerd
         ttf-terminus-nerd
         ttf-tinos-nerd
         ttf-ubuntu-mono-nerd
         ttf-ubuntu-nerd
         ttf-victor-mono-nerd)
pkgdesc="Iconic font aggregator, collection, and patcher"
pkgver=3.0.0
pkgrel=2
arch=('any')
url='https://github.com/ryanoasis/nerd-fonts'
_urlbase="${url}/releases/download/v${pkgver}"
license=('MIT')
options=('!debug' '!strip')
provides=('ttf-font-nerd')
groups=('nerd-fonts')
source=("3270-${pkgver}.zip::${_urlbase}/3270.zip"
        "agave-${pkgver}.zip::${_urlbase}/Agave.zip"
        "anonymouspro-${pkgver}.zip::${_urlbase}/AnonymousPro.zip"
        "arimo-${pkgver}.zip::${_urlbase}/Arimo.zip"
        "aurulent-${pkgver}.zip::${_urlbase}/AurulentSansMono.zip"
        "bigblueterminal-${pkgver}.zip::${_urlbase}/BigBlueTerminal.zip"
        "bitstreamveramono-${pkgver}.zip::${_urlbase}/BitstreamVeraSansMono.zip"
        "cascadiacode-${pkgver}.zip::${_urlbase}/CascadiaCode.zip"
        "codenewroman-${pkgver}.zip::${_urlbase}/CodeNewRoman.zip"
        "comicshanns-${pkgver}.zip::${_urlbase}/ComicShannsMono.zip"
        "cousine-${pkgver}.zip::${_urlbase}/Cousine.zip"
        "daddytimemono-${pkgver}.zip::${_urlbase}/DaddyTimeMono.zip"
        "dejavu-${pkgver}.zip::${_urlbase}/DejavuSansMono.zip"
        "droid-${pkgver}.zip::${_urlbase}/DroidSansMono.zip"
        "fantasque-${pkgver}.zip::${_urlbase}/FantasqueSansMono.zip"
        "fira-${pkgver}.zip::${_urlbase}/FiraCode.zip"
        "firamono-${pkgver}.zip::${_urlbase}/FiraMono.zip"
        "go-${pkgver}.zip::${_urlbase}/Go-Mono.zip"
        "hack-${pkgver}.zip::${_urlbase}/Hack.zip"
        "hasklig-${pkgver}.zip::${_urlbase}/Hasklig.zip"
        "heavydata-${pkgver}.zip::${_urlbase}/HeavyData.zip"
        "hermit-${pkgver}.zip::${_urlbase}/Hermit.zip"
        "iawriter-${pkgver}.zip::${_urlbase}/iA-Writer.zip"
        "ibmplexmono-${pkgver}.zip::${_urlbase}/IBMPlexMono.zip"
        "inconsolata-${pkgver}.zip::${_urlbase}/Inconsolata.zip"
        "inconsolatago-${pkgver}.zip::${_urlbase}/InconsolataGo.zip"
        "inconsolatalgc-${pkgver}.zip::${_urlbase}/InconsolataLGC.zip"
        "iosevka-${pkgver}.zip::${_urlbase}/Iosevka.zip"
        "iosevkaterm-${pkgver}.zip::${_urlbase}/IosevkaTerm.zip"
        "jetbrainsmono-${pkgver}.zip::${_urlbase}/JetBrainsMono.zip"
        "lekton-${pkgver}.zip::${_urlbase}/Lekton.zip"
        "liberationmono-${pkgver}.zip::${_urlbase}/LiberationMono.zip"
        "lilex-${pkgver}.zip::${_urlbase}/Lilex.zip"
        "meslo-${pkgver}.zip::${_urlbase}/Meslo.zip"
        "monofur-${pkgver}.zip::${_urlbase}/Monofur.zip"
        "monoid-${pkgver}.zip::${_urlbase}/Monoid.zip"
        "mononoki-${pkgver}.zip::${_urlbase}/Mononoki.zip"
        "mplus-${pkgver}.zip::${_urlbase}/MPlus.zip"
        "noto-${pkgver}.zip::${_urlbase}/Noto.zip"
        "opendyslexic-${pkgver}.zip::${_urlbase}/OpenDyslexic.zip"
        "overpass-${pkgver}.zip::${_urlbase}/Overpass.zip"
        "profont-${pkgver}.zip::${_urlbase}/ProFont.zip"
        "proggyclean-${pkgver}.zip::${_urlbase}/ProggyClean.zip"
        "robotomono-${pkgver}.zip::${_urlbase}/RobotoMono.zip"
        "sharetechmono-${pkgver}.zip::${_urlbase}/ShareTechMono.zip"
        "sourcecodepro-${pkgver}.zip::${_urlbase}/SourceCodePro.zip"
        "spacemono-${pkgver}.zip::${_urlbase}/SpaceMono.zip"
        "terminus-${pkgver}.zip::${_urlbase}/Terminus.zip"
        "tinos-${pkgver}.zip::${_urlbase}/Tinos.zip"
        "ubuntu-${pkgver}.zip::${_urlbase}/Ubuntu.zip"
        "ubuntumono-${pkgver}.zip::${_urlbase}/UbuntuMono.zip"
        "victormono-${pkgver}.zip::${_urlbase}/VictorMono.zip")
sha256sums=('d2cc949a6ede58b7e4cb381dfb832f451fbd3d42d2dce01dbeecd4d7362c69d3'
            'f31ad97d42848f5b293e2ba4a75f04e1bf140b4a718ba1d8a95c77e71a1323bd'
            'c5fc928f8bcf5c44e0d24c2f16d46c9a185eb1ddc7547274c45cae850f5693a1'
            '14a04ecb56f9b520e97b8974a475dee1ed9fcd75d80b18b3f79ae087a5cf73aa'
            '5df45377ef472f0d721be28cf8c424dd38a4e1d444f868f9a471a234de6773ea'
            'd017dbab1c1a79c2e9c7a79e494c66ae6fd8a18532caf3217de6e6e5ab45e344'
            '0aebf61c2868959e1d7377087be34fbbccff1ae41992dde8bc435646f5e2638b'
            '18692fc6f7829cb9fc71c1d3e409e2595539d310464d76523f27732107753dfc'
            '01529d02564511fb8a3c9e10011c9a0d1c4912fb979bd661cf606087ea2a5df4'
            '35db8f7d96b2094a211b169de020b29f1f337b5e29c649d1993b12860c48c024'
            'b3fa57d3ccbce0bfe412c81bb4907f6dd08d91cc82a05509d27bc32d00704f32'
            '2d5df5e3e05454b65c81f40322fb7392b6f18e1f8e6f2f65380a5575e592da20'
            'af406d84d6c52cb2251c96abe090d16a97d31017ea2ee48489fc5f53804d6670'
            'd186336f5a6ce7c67b9e2485d5b143e4c655ef59dcad9ee47d3fe3ff9c65b197'
            'e488890d690ba7787e3d34817eb3d5974d6d2039ee1ffc5f04caf7b6f0b320db'
            '705b7eaa5b687987cc0e65a961314250be0cbdac71e6ae5a8be5c8064361f37c'
            '9e5ce824731cd365b5ec2b3ad0355797326b3d421eeb39358cb27f78f485e4db'
            '9969921572402738cef5e85174160d2b59728df2d5f7949bdf0bcbd2fa2e6c8e'
            'da1d4d89298d8211a53629e6e43da6fffe9b725a09d5ad96b213595fb438058e'
            'c1d919d06678684317205ae20de40357616a4a0448a95fc8caf99dd4b55f4ee2'
            '00164c3331126eaf32f170322c845ef81c5f78f5a9b9bd03165e1f82df190bb4'
            'e9281038b320978c99cbc75296586fe8580af4dc9bf79314fd49f72f5e8642b7'
            '08e57f49f83082332dd9172257e71cda0be0fa0376d34c1ebdc04d3e57aed194'
            'ca104358629dc07868ad0848c2627923dd8f650a623079a27e8175ebb3edd623'
            '42ba957b998fccc972d196b31f372ef5b67eab39583f9a14c8c1aec16b4ee13e'
            'e39771fe2e9fe279511e0369d3b64b1c700d9391c8cc084db17878b512d69c8e'
            '2d33c53aac3426f6e2c2a2d697d53510075e5cbd4913095866b45c93ca95f30b'
            '104fe5998982ed8f55cc05069f325bf886da8dfa6036dc4113f198594f9b481b'
            '36f274439523ec9afb90e94e00f2a8e03954e56e39a61c876c6bb7c6b57d9292'
            'ccaa9c2625a20b47bc253ccd1d59a6f726cee8922d5b9b52c197364d36e9eeeb'
            '6ccb4417729fffcec59a925dc581afca2443b3b27a55863b7377dcfe3aee2930'
            'f66aa180b000671b5d0f6498b4065424115d4635538b03b03b083ded819350bd'
            '367629808e8e58f16b02d4b414289c3a1ed2550e6d38c45f7d93993aa7746935'
            'e87f90f5bcf434d7eb3eba9dcc6c66ec27b2cf40ee6391d055436ab47c6efcd3'
            '8dfb70df06d7dc96146e17e2d40ee087b5bd3200484bf8d468de6260c1a92f49'
            'b9d215398237fcb3a53de9f6c60c30a00494af7b336b652da7a8e12e0f380001'
            'bc14697e0d471f3737e806c764c6d370efa136ae1106618993aff525cfe4c0ec'
            'b59ba3c6ca1b2231c2dc96103c6a5f737a1210893288dbe5ea28f64ad0a642a3'
            'a6dff18fe25906c2aa749463e6553d7d04999cfd1506c516be25d4f8f71e6bee'
            '0550274a409ca273eee76352e6067f18540cfee93da2019ce4f36559aa767404'
            'c9812ba813a4b1c899894e94478ecd05a37c3e40fe95bf76e98253e9600f4604'
            '6c407fede4ebfb29b0913ab1a1b8e7e6ca5e57bea2222c9c2f65fc7c61df9445'
            '80fc32c6ac35191efb7e9a8ab26a260538c620296671bc1046caf1c9d630621e'
            '7506fb6c16d1f19002c1eb43b3e475fb9c349f63c753b7b0e11dc007edb90ca1'
            '906002e40b70933de50e8ccac48e2f8fff816c6060499f4a81e2bc16af0cdfff'
            '2939dfc2a18294b0fc484ec38be51f141df7266d794000b151d1950967caf23e'
            'c624cbd887a04b7c46f938c0e81ba8965feebd8f602e2afa13e61bec12159d22'
            'c133e1c01b8dfb636bca37d5c7b772775630fccdb2f69217adfe5b830aadab86'
            '9f714148a54fa1b4f515f975399f801d170699ff4458a2d9674af3b3ff9f2f29'
            'a8746fc1016d64463be15ba1437b85e9b22beaa9a0e22a91761089030a2fdfba'
            '7af191908ae8e37ab1146eebd2c67f5f5151aa65e954ec1be59c65dc998ef587'
            '30e08dc555d87cde4afa5f76b282ab8dad5fbc0ee7d012e5e3b9c8e97d93b081')
noextract=("${source[@]%%::*}")

prepare() {
  # zip files don't include a font-specific directory, so we have to make them
  for _font in 3270 agave anonymouspro arimo aurulent bigblueterminal \
               bitstreamveramono cascadiacode codenewroman cousine \
               daddytimemono dejavu droid fantasque fira firamono go hack \
               hasklig heavydata hermit iawriter ibmplexmono inconsolata \
               inconsolatago inconsolatalgc iosevka jetbrainsmono lekton \
               liberationmono lilex meslo monofur monoid mononoki mplus noto \
               opendyslexic overpass profont proggyclean robotomono \
               sharetechmono sourcecodepro spacemono terminus tinos ubuntu \
               ubuntumono victormono iosevkaterm comicshanns; do
  rm -rf ${_font}
  mkdir ${_font}
  bsdtar xf ${_font}-${pkgver}.zip -C ${_font}
  done
}

package_ttf-arimo-nerd() {
  pkgdesc="Patched font Arimo from nerd fonts library"
  conflicts=(nerd-fonts-arimo)
  replaces=(nerd-fonts-arimo)

  install -Dm644 arimo/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 arimo/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_otf-aurulent-nerd() {
  pkgdesc="Patched font Aurulent Sans Mono from nerd fonts library"

  install -Dm644 aurulent/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 aurulent/"SIL Open Font License.txt" \
          -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-firacode-nerd() {
  pkgdesc="Patched font Fira (Fura) Code from nerd fonts library"
  conflicts=(nerd-fonts-fira-code)
  replaces=(nerd-fonts-fira-code)

  install -Dm644 fira/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 fira/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_otf-firamono-nerd() {
  pkgdesc="Patched font Fira (Fura) Mono from nerd fonts library"
  conflicts=(nerd-fonts-fira-mono)
  replaces=(nerd-fonts-fira-mono)

  install -Dm644 firamono/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 firamono/LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-hack-nerd() {
  pkgdesc="Patched font Hack from nerd fonts library"
  conflicts=(nerd-fonts-hack)
  replaces=(nerd-fonts-hack)

  install -Dm644 hack/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 hack/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-iosevka-nerd() {
  pkgdesc="Patched font Iosevka from nerd fonts library"
  conflicts=(nerd-fonts-iosevka)
  replaces=(nerd-fonts-iosevka)

  install -Dm644 iosevka/*.ttf -t "${pkgdir}"/usr/share/fonts/TTF/
  install -Dm644 iosevka/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-iosevkaterm-nerd() {
  pkgdesc="Patched font Iosevka Term from nerd fonts library"

  install -Dm644 iosevkaterm/*.ttf -t "${pkgdir}"/usr/share/fonts/TTF/
  install -Dm644 iosevkaterm/LICENSE.md -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-terminus-nerd() {
  pkgdesc="Patched font Terminus (Terminess) from nerd fonts library"
  conflicts=(nerd-fonts-terminus)
  replaces=(nerd-fonts-terminus)

  install -Dm644 terminus/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 terminus/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-ubuntu-nerd() {
  pkgdesc="Patched font Ubuntu from nerd fonts library"
  conflicts=(nerd-fonts-ubuntu)
  replaces=(nerd-fonts-ubuntu)

  install -Dm644 ubuntu/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ubuntu/LICENCE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-ubuntu-mono-nerd() {
  pkgdesc="Patched font Ubuntu Mono from nerd fonts library"
  conflicts=(nerd-fonts-ubuntu-mono ttf-ubuntumono-nerd)
  replaces=(nerd-fonts-ubuntu-mono ttf-ubuntumono-nerd)

  install -Dm644 ubuntumono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ubuntumono/LICENCE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-3270-nerd() {
  pkgdesc="Patched font IBM 3270 from nerd fonts library"

  install -Dm644 3270/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 3270/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-agave-nerd() {
  pkgdesc="Patched font Agave from nerd fonts library"
  conflicts=(nerd-fonts-agave)
  replaces=(nerd-fonts-agave)

  install -Dm644 agave/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 agave/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-bigblueterminal-nerd() {
  pkgdesc="Patched font Big Blue Terminal from nerd fonts library"

  install -Dm644 bigblueterminal/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 bigblueterminal/LICENSE.TXT \
                    "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.TXT"
}

package_ttf-anonymouspro-nerd() {
  pkgdesc="Patched font Anonymous Pro (Anonymice) from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-anonymous-pro)
  replaces=(nerd-fonts-anonymous-pro)

  install -Dm644 anonymouspro/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 anonymouspro/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-bitstream-vera-mono-nerd() {
  pkgdesc="Patched font Bitstream Vera Mono from nerd fonts library"
  conflicts=(nerd-fonts-bitstream-vera-mono)
  replaces=(nerd-fonts-bitstream-vera-mono)

  install -Dm644 bitstreamveramono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 bitstreamveramono/"Bitstream Vera License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/Bitstream Vera License.txt"
}

package_ttf-cascadia-code-nerd() {
  pkgdesc="Patched font Cascadia Code (Caskaydia) from nerd fonts library"
  conflicts=(nerd-fonts-cascadia-code)
  replaces=(nerd-fonts-cascadia-code otf-cascadia-code-nerd)

  install -Dm644 cascadiacode/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 cascadiacode/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_otf-codenewroman-nerd() {
  pkgdesc="Patched font Code New Roman from nerd fonts library"

  install -Dm644 codenewroman/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 codenewroman/license.txt "${pkgdir}/usr/share/licenses/${pkgname}/license.txt"
}

package_otf-comicshanns-nerd() {
  pkgdesc="Patched font Comic Sans (Comic Shanns) from nerd fonts library"

  install -Dm644 comicshanns/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 comicshanns/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-cousine-nerd() {
  pkgdesc="Patched font Cousine from nerd fonts library"

  install -Dm644 cousine/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 cousine/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-daddytime-mono-nerd() {
  pkgdesc="Patched font Daddy Time Mono from nerd fonts library"

  install -Dm644 daddytimemono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 daddytimemono/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-dejavu-nerd() {
  pkgdesc="Patched font Dejavu Sans Mono from nerd fonts library"
  conflicts=(nerd-fonts-dejavu-complete)
  replaces=(nerd-fonts-dejavu-complete)

  install -Dm644 dejavu/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 dejavu/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-droid-nerd() {
  pkgdesc="Patched font Droid Sans Mono from nerd fonts library"
  conflicts=(nerd-fonts-droid-sans-mono)
  replaces=(nerd-fonts-droid-sans-mono)

  install -Dm644 droid/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 droid/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-fantasque-nerd() {
  pkgdesc="Patched font Fantasque Sans Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-fantasque-sans-mono)
  replaces=(nerd-fonts-fantasque-sans-mono)

  install -Dm644 fantasque/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 fantasque/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-go-nerd() {
  pkgdesc="Patched font Go Mono from nerd fonts library"
  conflicts=(nerd-fonts-go-mono)
  replaces=(nerd-fonts-go-mono)

  install -Dm644 go/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 go/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-hasklig-nerd() {
  pkgdesc="Patched font Hasklig (Hasklug) from nerd fonts library"
  conflicts=(nerd-fonts-hasklig)
  replaces=(nerd-fonts-hasklig)

  install -Dm644 hasklig/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 hasklig/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-heavydata-nerd() {
  pkgdesc="Patched font Heavy Data from nerd fonts library"

  install -Dm644 heavydata/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 heavydata/"Vic Fieger License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/Vic Fieger License.txt"
}

package_otf-hermit-nerd() {
  pkgdesc="Patched font Hermit from nerd fonts library"
  conflicts=(nerd-fonts-hermit)
  replaces=(nerd-fonts-hermit)

  install -Dm644 hermit/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 hermit/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-iawriter-nerd() {
  pkgdesc="Patched font iA Writer (iM Writing) from nerd fonts library"

  install -Dm644 iawriter/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 iawriter/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-ibmplex-mono-nerd() {
  pkgdesc="Patched font IBM Plex Mono (Blex) from nerd fonts library"
  conflicts=(nerd-fonts-ibm-plex-mono)
  replaces=(nerd-fonts-ibm-plex-mono)

  install -Dm644 ibmplexmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 ibmplexmono/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-inconsolata-nerd() {
  pkgdesc="Patched font Inconsolata from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-inconsolata)
  replaces=(nerd-fonts-inconsolata)

  install -Dm644 inconsolata/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolata/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-inconsolata-go-nerd() {
  pkgdesc="Patched font Inconsolata Go from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-inconsolata-go)
  replaces=(nerd-fonts-inconsolata-go)

  install -Dm644 inconsolatago/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolatago/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-inconsolata-lgc-nerd() {
  pkgdesc="Patched font Inconsolata LGC from nerd fonts library"
  conflicts=(nerd-fonts-inconsolatalgc)
  replaces=(nerd-fonts-inconsolatalgc)

  install -Dm644 inconsolatalgc/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 inconsolatalgc/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-jetbrains-mono-nerd() {
  pkgdesc="Patched font JetBrains Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-jetbrains-mono)
  replaces=(nerd-fonts-jetbrains-mono)

  install -Dm644 jetbrainsmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 jetbrainsmono/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-lekton-nerd() {
  pkgdesc="Patched font Lekton from nerd fonts library"

  install -Dm644 lekton/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 lekton/"SIL Open Font License.txt" \
          "${pkgdir}/usr/share/licenses/${pkgname}/SIL Open Font License.txt"
}

package_ttf-liberation-mono-nerd() {
  pkgdesc="Patched font Liberation Mono from nerd fonts library"
  conflicts=(nerd-fonts-liberation-mono)
  replaces=(nerd-fonts-liberation-mono)

  install -Dm644 liberationmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 liberationmono/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-lilex-nerd() {
  pkgdesc="Patched font Lilex from nerd fonts library"

  install -Dm644 lilex/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 lilex/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-meslo-nerd() {
  pkgdesc="Patched font Meslo LG from nerd fonts library"
  conflicts=(nerd-fonts-meslo)
  replaces=(nerd-fonts-meslo)

  install -Dm644 meslo/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 meslo/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-monofur-nerd() {
  pkgdesc="Patched font Monofur from nerd fonts library"
  conflicts=(nerd-fonts-monofur)
  replaces=(nerd-fonts-monofur)

  install -Dm644 monofur/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 monofur/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-monoid-nerd() {
  pkgdesc="Patched font Monoid from nerd fonts library"
  conflicts=(nerd-fonts-monoid)
  replaces=(nerd-fonts-monoid)

  install -Dm644 monoid/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 monoid/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-mononoki-nerd() {
  pkgdesc="Patched font Mononoki from nerd fonts library"
  conflicts=(nerd-fonts-mononoki)
  replaces=(nerd-fonts-mononoki)

  install -Dm644 mononoki/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 mononoki/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-mplus-nerd() {
  pkgdesc="Patched font MPlus from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-mplus)
  replaces=(nerd-fonts-mplus)

  install -Dm644 mplus/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 mplus/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-noto-nerd() {
  pkgdesc="Patched font Noto from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-noto)
  replaces=(nerd-fonts-noto)

  install -Dm644 noto/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 noto/LICENSE_OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE_OFL.txt"
}

package_otf-opendyslexic-nerd() {
  pkgdesc="Patched font OpenDyslexic from nerd fonts library"

  install -Dm644 opendyslexic/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 opendyslexic/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_otf-overpass-nerd() {
  pkgdesc="Patched font Overpass from nerd fonts library"
  conflicts=(nerd-fonts-overpass)
  replaces=(nerd-fonts-overpass)

  install -Dm644 overpass/*.otf -t "${pkgdir}/usr/share/fonts/OTF"
  install -Dm644 overpass/LICENSE.md "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.md"
}

package_ttf-profont-nerd() {
  pkgdesc="Patched font ProFont from nerd fonts library"
  conflicts=(nerd-fonts-profont)
  replaces=(nerd-fonts-profont)

  install -Dm644 profont/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 profont/LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}

package_ttf-proggyclean-nerd() {
  pkgdesc="Patched font ProggyClean from nerd fonts library"

  install -Dm644 proggyclean/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 proggyclean/Licence.txt "${pkgdir}/usr/share/licenses/${pkgname}/Licence.txt"
}

package_ttf-roboto-mono-nerd() {
  pkgdesc="Patched font Roboto Mono from nerd fonts library"
  conflicts=(nerd-fonts-roboto-mono)
  replaces=(nerd-fonts-roboto-mono)

  install -Dm644 robotomono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 robotomono/LICENSE.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE.txt"
}

package_ttf-sharetech-mono-nerd() {
  pkgdesc="Patched font Share Tech Mono (Shure Tech Mono) from nerd fonts library"
  license=('custom:OFL')

  install -Dm644 sharetechmono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 sharetechmono/OFL.txt "${pkgdir}/usr/share/licenses/${pkgname}/OFL.txt"
}

package_ttf-sourcecodepro-nerd() {
  pkgdesc="Patched font Source Code Pro from nerd fonts library"
  conflicts=(nerd-fonts-source-code-pro)
  replaces=(nerd-fonts-source-code-pro)

  install -Dm644 sourcecodepro/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 sourcecodepro/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-space-mono-nerd() {
  pkgdesc="Patched font Space Mono from nerd fonts library"
  license=('custom:OFL')
  conflicts=(nerd-fonts-source-space-mono)
  replaces=(nerd-fonts-source-space-mono)

  install -Dm644 spacemono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 spacemono/OFL.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-tinos-nerd() {
  pkgdesc="Patched font Tinos from nerd fonts library"
  license=('Apache')
  conflicts=(nerd-fonts-source-tinos)
  replaces=(nerd-fonts-source-tinos)

  install -Dm644 tinos/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 tinos/"Apache License.txt" -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}

package_ttf-victor-mono-nerd() {
  pkgdesc="Patched font Victor Mono from nerd fonts library"
  conflicts=(ttf-nerd-fonts-victor-mono)
  replaces=(ttf-nerd-fonts-victor-mono)

  install -Dm644 victormono/*.ttf -t "${pkgdir}/usr/share/fonts/TTF"
  install -Dm644 victormono/LICENSE.txt -t "${pkgdir}/usr/share/licenses/${pkgname}/"
}
